﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ADO.NET.Samples.Common;

namespace ADO.NET.Samples.Forms.EntityFramework
{
    [FormDescription("LINQ to Entities Data Binding", "LINQ to Entities data binding example.")]
    public partial class LINQtoEntitiesDataBinding : Form
    {
        public LINQtoEntitiesDataBinding()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Data binding
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LINQtoEntitiesDataBinding_Load(object sender, EventArgs e)
        {
            DBEntities db = new DBEntities();
            this.listBox1.DataSource = db.Users;
        }
    }
}
